<input type="hidden" id="bootMessage" th:value="${message}" xmlns:th="http://www.w3.org/1999/xhtml">
<input type="hidden" id="bootParamMessage" th:value="${param.message}" xmlns:th="http://www.w3.org/1999/xhtml">
<script src="/metronic/assets/plugins/bootbox/bootbox.min.js" type="text/javascript" ></script>
<script type="text/javascript">
<!--
$(function() {
	var msg = $("#bootMessage").val();

    if(msg == "") {
        msg = $("#bootParamMessage").val();
    }

	if (msg != "") {
		boxAlert(msg);
	}
});

function boxAlert(msg) {
	bootbox.alert({  
        buttons: {  
            ok: {  
                label: '确定'
            }
        },  
        message: msg	
	});
}

function boxConfirm(msg, callback) {
	// bootbox.confirm(msg, callback);
	bootbox.confirm(
			{  
		        buttons: {  
		            confirm: {  
		                label: '确定'
		            },  
		            cancel: {  
		                label: '取消'
		            }  
		        },  
		        message: msg,  
		        callback: callback
		        //title: "bootbox confirm也可以添加标题哦",		
			});
}

function confirmDeleteData(msg, url) {
	boxConfirm(msg, function(val) {
		if(val == true) {
			document.location=url;
		}
	});
}
//-->
</script>